home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / irix / cc_c++_make_csh / pmake.qr < prev    next >
Encoding:
Text File  |  1994-08-02  |  10.0 KB  |  204 lines

  1.      
  2.                         pmake quick reference guide
  3.      
  4.      Command flags
  5.      -------------
  6.      -d <what>       Turn on debug in <what> modules of pmake.
  7.      -f <file>       Use <file> for makefile.
  8.      -h              Print help.
  9.      -i              Ignore all errors.
  10.      -k              Keep going even after detecting an error.
  11.      -l              Create lock file.
  12.      -n              Don't actually execute.
  13.      -p <#>          Print graph. # = 0, 1, 2, 3
  14.      -q              Query and return 0 if up-to-date.
  15.      -r              Remove built-in rules.
  16.      -s              Do not echo commands.
  17.      -t              Just touch targets.
  18.      -v              System V compatable make (same as -B -V).
  19.      -x              Ignored.
  20.      -B              System V compatable but try to parallelize.
  21.      -C              Disable -B.
  22.      -D <variable>   Define <variable> to be 1.
  23.      -I <directory>  Define <directory> to search for include files.
  24.      -J <#>          Specify maximum number of jobs to run at once.
  25.      -L              Ignored.
  26.      -M              Do old-style make.
  27.      -P              Don't use pipes.  Controls the way pmake displays
  28.                      output from all of its children.
  29.      -V              Do old-style variable expansion.
  30.      -W              Don't print warning messages.
  31.      -X              Ignored.
  32.      VAR=value       Set the value of variable VAR.
  33.      
  34.      Makefile Search Order
  35.      ---------------------
  36.              Normal          -M flag
  37.              ------          -------
  38.              ./Makefile      ./makefile
  39.              ./makefile      ./Makefile
  40.      
  41.      Dependency operators
  42.      --------------------
  43.      :       Set dependency for target to source.  Can accumulate over
  44.              multiple lines.
  45.      !       Same as : except always done.
  46.      ::      Same as : except cannot accumulate.  Target can be specified
  47.              more than once but each time is separate.
  48.      
  49.      Variable definitions
  50.      --------------------
  51.      <var> = <value>         Set <var> to <value>.
  52.      <var> += <value>        Append <value> to <var>.
  53.      <var> ?= <value>        Reassign <var> to <value> if <var> exists.
  54.      <var> := <value>        Set <var> to expanded <value>.
  55.      <var> != <command>      Execute <command> and set <var> to stdout.
  56.      
  57.      Predefined local variables
  58.      --------------------------
  59.      .TARGET   ($@)  Name of the target.  If an archive, includes the path
  60.                      to the file which will be archived.
  61.      .OODATE   ($?)  List of sources that were out of date.
  62.      .ALLSRC   ($>)  List of all sources for this target.
  63.      .PREFIX   ($*)  File portion of the current file being processed.
  64.      .IMPSRC   ($<)  Implied source file for this target (if none
  65.                      provided).
  66.      .ARCHIVE  ($%)  The path to the archive file.
  67.      .MEMBER   ($!)  The actual member name.
  68.      $(@F)           File portion of target file.
  69.      $(<F)  $(>F)    File portion of all sources for this target.
  70.      $(*F)           File portion of current file being processed.
  71.      $(%F)           File portion of archive file.
  72.      $(@D)           Directory portion of target file.
  73.      $(<D)  $(>D)    Directory portion of all sources for this target.
  74.      $(*D)           Directory portion of the current file being processed.
  75.      $(%D)           Directory portion of archive file.
  76.      
  77.      Predefined variables
  78.      --------------------
  79.      .PMAKE          Set to name by which pmake was invoked.
  80.      MAKE            Set to name by which pmake was invoked.
  81.      .MAKEFLAGS      Set to flags passed to pmake.
  82.      MFLAGS          Set to flags passed to pmake.
  83.      
  84.      Environment variables (always included)
  85.      ---------------------
  86.      PMAKE           Set to flags to be used by pmake.
  87.      
  88.      Variable expansion      $(<var>[:<mod>[:<mod>]])
  89.      ------------------
  90.      M<pattern>      Select only words containing pattern.
  91.                      *       0 or more characters of any sort.
  92.                      ?       Any single character.
  93.                      [abcd]  Any single character a, b, c or d.
  94.                      [a-z]   Any single lower case character.
  95.      N<pattern>      Same as M except selects all other words except those
  96.                      containing the pattern.
  97.      S/<p1>/<p2>/[g] Replaces <p1> with <p2>. 'g' does it globally.  Can
  98.                      have '^' or '$' to select beginning or ending of word.
  99.                      '&' in <p2> represents all of <p1>.
  100.      T               Tail of the component.
  101.      H               Head of the component.
  102.      E               Extension of the component.
  103.      R               Root of the component.
  104.      
  105.      Special pmake commands
  106.      ----------------------
  107.      #include "<file>"       Include <file> from search path internal to
  108.                              pmake.
  109.      #include <"file">       Include "file" from pmake system directory.
  110.      include <file>          Include <file> from current directory.
  111.      #if <exp>               Conditional execution.  Can use the following
  112.                              macros:
  113.                                defined <var> <var> must be defined.
  114.                                make          .MAIN must be defined.
  115.                                exists <file> <file> must be in .PATH.
  116.                                empty <var>   After expansion, <var> is null.
  117.      #ifdef <var>            Conditional execution to test variable
  118.                              definition. 
  119.      #ifndef <var>           Conditional execution to test variable
  120.                              non-definition.
  121.      #ifmake                 Conditional execution to test if .MAIN
  122.                              defined.
  123.      #ifnmake                Conditional execution to test if .MAIN not
  124.                              defined.
  125.      #else                   Follows one of the above #if???.
  126.      #elif                   Follows one of the above #if???.
  127.      #elifdef                Follows one of the above #if???.
  128.      #elifndef               Follows one of the above #if???.
  129.      #elifmake               Follows one of the above #if???.
  130.      #elifnmake              Follows one of the above #if???.
  131.      #endif                  Follows one of the above #if???.
  132.      #undef                  Un-defines a variable.
  133.      
  134.      Target attributes       <target> : <attribute>
  135.      -----------------
  136.      .DONTCARE       If pmake can't figure out how to create it, pmake
  137.                      doesn't care.
  138.      .EXEC           Always executes the script but is invisible to other
  139.                      targets.
  140.      .IGNORE         Ignore errors from target's commands.
  141.      .INVISIBLE      Does not affect another target's local variables.
  142.      .JOIN           Join's this target's source list to that of all the
  143.                      targets that depend on it.
  144.      .MAKE           Special target to be executed even if -n specified.
  145.      .NOTMAIN        If this is first target, don't assume it is .MAIN.
  146.      .PRECIOUS       Do not delete target if pmake is interrupted.
  147.      .SILENT         Do not echo script.
  148.      .USE            Causes all commands, sources and attributes to be
  149.                      passed to targets that depend on this target.
  150.      .EXPORT         Not used.
  151.      .EXPORTSAME     Not used.
  152.      .NOEXPORT       Not used.
  153.      
  154.      Special targets
  155.      ---------------
  156.      .BEGIN          Performed first.
  157.      .DEFAULT        Performed if pmake can't figure out how to make a
  158.                      particular target.
  159.      .END            Performed last.
  160.      .IGNORE         Defines all targets that are to ignore errors.
  161.      .INCLUDES       Lists suffixes that are to be searched for in .PATH.
  162.      .INTERRUPT      Performed if pmake is interrupted.
  163.      .LIBS           Lists suffixes that are to be searched for in .LIBS.
  164.      .MAIN           Defines target to be used if no .MAIN defined.
  165.      .MAKEFLAGS      Default flags to be used by pmake.
  166.      .NULL           Lists suffixes to assume if none present on a file.
  167.      .PATH           Lists directories to search for files in.
  168.      .PATH<suffix>   Lists directories to search for files with the given
  169.                      suffix in.
  170.      .PRECIOUS       Sets the .PRECIOUS attribute to each of the sources
  171.                      given.
  172.      .RECURSIVE      Applies the .MAKE attribute to all of its sources.
  173.      .SHELL          Defines the shell to use by pmake.  Sources have the
  174.                      following format:
  175.                        path=<path>   Path of shell.
  176.                        name=<name>   Name of shell.
  177.                        quiet=<cmd>   Command to send shell to make it not
  178.                                      echo commands.
  179.                        echo=<cmd>    Command to send shell to make it echo
  180.                                      commands.
  181.                        filter=<fmt>  Text of echo-off command to be
  182.                                      filtered from printing.
  183.                        echoFlag=<flg>Flag to use to enable echoing of
  184.                                      commands by the shell (-x).
  185.                        errFlag=<flg> Flag to use to turn error checking on
  186.                                      in the shell (-e).
  187.                        check=<cmd>   Command to send shell to turn on error
  188.                                      checking.
  189.                        ignore=<cmd>  Command to send shell to turn off
  190.                                      error checking.
  191.                        hasErrCtl=<yes/no>Indicates whether the shell even
  192.                                      has error checking.
  193.      .SILENT         Applies the .SILENT attribute to each of its sources.
  194.      .SUFFIXES       Defines the suffixes that pmake should recognize.
  195.      <attribute>     Any of the attributes listed above can be given in
  196.                      this form to set the attribute for the sources listed.
  197.      .EXPORT         Ignored.
  198.      
  199.      Files of interest
  200.      -----------------
  201.      /usr/include/make/system.mk     Built-in rules.
  202.      /usr/include/make/makelib.mk    .USE target for making archives.
  203.      /usr/include/make/makelint.mk   .USE target for makeing lint libs.
  204.